home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
DO1002.ARJ
/
DIR.SCR
< prev
next >
Wrap
Text File
|
1991-12-28
|
3KB
|
91 lines
.pg wi full clr
»cy«COMMAND NAME»gray«: »%t« Directory »ye«
/DIR {pattern} {$[F|P|E]}
/cw
Display a directory of files matching {pattern}.
The default »cy«{pattern}»#« is all files ("»wh«*.*»#«").
If a file is selected by »+bo«highlighting»#« it and pressing »bo«<enter>»#«,
information about the file is returned in the variable
»ye«FILENAME»#« based on the "»cy«$»#«" token, if entered. The following
information is returned:
~036»ye«P »#«or »ye«none »gr«Full pathname»#«
~036»ye«F»gr« Full filename (no path)»#«
~036»ye«E»gr« Extension only
»#«
The "»cy«$»#«" indicators can also be used in any command or display
line that includes »wh«variable expansion»#«.
.pg clr
The following are some examples of various uses of the »%t«/DIR»#«
command and the "»cy«$»#«" variables. Press the »wh«Up/Down Arrow keys»#« or
»wh«page up/down»#« keys to see more files or pisition the cursor. If
»bo«<enter>»#« is pressed while the cursor is on a »ye«directory entry»#«, the
display will change to that directory.
.pg clr
The following command will display all files in the current directory.
Press »bo«<esc>»#« when you are finished viewing the files.
|/DIR
.pg clr
This command will display all files with an extension of "»wh«BAT»#«"
in the root directory.
Press »bo«<esc>»#« when you are finished viewing the files.
|/DIR "\*.BAT"
.pg clr
The »cy«{pattern}»#« allows variable substitution. For example, in which
directory are all your executable files kept (be sure to include the
drive)?
/SET default C:\DOS
/GETS dir default "»ye«Which Directory»+re«?»#«"
Now that we have this information, we'll substitute it in a »%t«/DIR»#«
command and display all the "»ye«EXE»#«" files there. Press »bo«<esc>»#« when
you're through viewing the directory.
|/DIR %dir\*.EXE
.pg clr
Pressing the »bo«<enter>»#« key when the cursor is on a file will return
the requested information in the variable »ye«FILENAME»#«. Select any file
in the directory by highlighting it and pressing »bo«<enter>»#«.
.pg
/dir
Here is the line that will display the pathname (the default):
|The complete path name (»wh«%FILENAME»#«) was returned
.pg clr
But, you do not have to have a separate »%t«/DIR»#« command to display
filenames or use them in commands. Simply enter the "»ye«$»#«" variables
"»ye«F»#«", "»ye«P»#«", "»ye«E»#«" in your display or command line. You can follow this
with a »cy«{pattern}»#« enclosed in parentheses ["»cy«()»#«"] to select only specific
files.
Here are some examples. We'll show you to command or line before
executing it.
Select a file from each and press »bo«<enter>»#«.
.pg clr
First, let's use the »wh«path variable»#« in a »%t«/LIST»#« command
|/LIST $P
.clr
Next, let's display a »wh«filename»#« in a line:
|»cy«The filename is»gray«:»wh« $F»#«
.pg clr
Now, let's display a »wh«extension»#« in a display line:
|»cy«The extension is»gray«:»wh« $E»#«
/ENDEXEC